﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LS.Entitys;
namespace LS.Cores
{
    /// <summary>
    /// 提供文件存储表服务
    /// </summary>
    [Serializable]
    public class SysFileService : BaseService<SysFileEntity>, ISysFile
    {
        #region 实现接口方法
        
        public PageDataView<SysFileEntity> GetPageData(string strwhere, int currentPage = 1, int pageSize = 20, string sort = "id")
        {
            PageCriteria criteria = new PageCriteria();
            criteria.Condition = "1=1";
            if (!string.IsNullOrEmpty(strwhere))
            {
                criteria.Condition += strwhere;
            }
            criteria.CurrentPage = currentPage;
            criteria.Fields = "*";
            criteria.PageSize = pageSize;
            criteria.TableName = "sys_file";
            criteria.PrimaryKey = "id";
            criteria.Sort = sort;
            return SqlHelper.GetPageData<SysFileEntity>(criteria);
        }
      
        #endregion 实现接口方法
    }
}
